import request from '@/utils/request'

// 发送获取面经列表页请求
export const articleAPI = ({ current, sorter }) => {
  return request.get('/h5/interview/query', {
    params: {
      current: current,
      pageSize: 10,
      sorter: sorter
    }
  })
}

// 发送获取单个面经接口
export const oneAPI = (id) => {
  return request.get('/h5/interview/show', {
    params: {
      id
    }
  })
}

// 发送点赞收藏接口
export const likeAPI = ({ id, optType }) => {
  return request.post('/h5/interview/opt', {
    id,
    optType
  })
}

// 收藏页请求
export const collectAPI = ({ optType, page }) => {
  return request.get('/h5/interview/opt/list', {
    params: {
      optType,
      page
    }
  })
}
